﻿CREATE PROCEDURE [dbo].[sp_Get_LeadBlock]
	@LeadBlockCode VARCHAR(10)
AS
	SELECT z.Zip, zi.Territory, zi.Market, 
	zi.ActiveLeadCount, zi.LapsedLeadCount, zi.BusinesLeadCount, zi.NeighborLeadCount,
	zi.Latitude, zi.Longitude, zi.AgentName, zi.State
	FROM ZipInfo zi
	INNER JOIN Zips z
	on zi.ZipID = z.ZipID
	WHERE z.Zip = @LeadBlockCode